package com.lzh.others.java8;

import java.util.function.Predicate;

public class TestMin {
    private interface IntPredicate<T> {
        public boolean test(int value);
    }

    public static void overloadedMethod(Predicate<Integer> Lambda) {
        if (Lambda.test(2))
        System.out.println("BinaryOperator");
        else
            System.out.println("false");
    }

    public static void overloadedMethod(IntPredicate<Boolean> predicate) {
        System.out.println("IntegerBiFunction");
    }

    public static void main(String[] args) {
        //因为重载的两个方法，入参都是一个接口 无法区分区别
        overloadedMethod((Predicate<Integer>) integer -> {
            if (integer == 1) return true;
            return false;
        });
    }
}
